{% extends 'userena/base_userena.html' %}
{% load i18n %}

{% block content_title %}<h2 class="content-title">Account &raquo; {{ account.user.username }}</h2>{% endblock %}

{% block content %}

<ul id="profile-nav">
     <li><a href="{% url 'userena_profile_detail' user.username %}">{% trans "View profile" %}</a></li>
     <li><a href="{% url 'userena_profile_edit' user.username %}">{% trans "Edit details" %}</a></li>
     <li><a href="{% url 'userena_password_change' user.username %}">{% trans "Change password" %}</a></li>
     <li class="selected"><a href="{% url 'userena_email_change' user.username %}">{% trans "Change email" %}</a></li>
 </ul>

<form action="" method="post">
    {% if user.username == account.user.username %}
          <ul id="box-nav">
              <li class="first"><a href="{% url 'userena_detail' user.username %}"><span>{% trans 'View profile' %}</span></a></li>
              <li><a href="{% url 'userena_edit' account.user.username %}">{% trans "Edit profile" %}</a></li>
              <li><a href="{% url 'userena_password_change' account.user.username %}">{% trans "Change password" %}</a></li>
              <li class="last selected"><a href="{% url 'userena_email_change' account.user.username %}">{% trans "Change email" %}</a></li>
          </ul>
          {% endif %}
    {% csrf_token %}
    <fieldset>
        <legend>{% trans "Change email address" %}</legend>
        {{ form.as_p }}
    </fieldset>
    <input type="submit" value="{% trans "Change email" %}" />
</form>
{% endblock %}
